package com.example.administrator.waitan.homepage;

import android.app.Service;
import android.graphics.Bitmap;
import android.util.LruCache;

import com.android.volley.toolbox.ImageLoader;


/**
 * Created by Administrator on 2016/1/12.
 */
public class HomePagerImageLoader implements ImageLoader.ImageCache {
    int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
    private LruCache<String,Bitmap> cache = new LruCache<>(maxMemory);

    @Override
    public Bitmap getBitmap(String url) {
        return cache.get(url);
    }

    @Override
    public void putBitmap(String url, Bitmap bitmap) {
        cache.put(url,bitmap);
    }
}
